import { _decorator, Component, Prefab } from 'cc';
import { editor } from './core/Editor';
import { gameConst } from './core/GameConst';
import { GlobelPrefab } from './core/GlobelPrefab';
import NativeUtils from './util/NativeUtils';
const { ccclass, property } = _decorator;

@ccclass('Main')
export class Main extends Component {

    start() {
        gameConst.globelPrefab = this.node.getComponent(GlobelPrefab);
        this.init();
    }

    // update(deltaTime: number) {
        
    // }

    private init() {
        editor.init(this.node);
        // NativeUtils.saveJson("测试保存数据");
        // NativeUtils.saveJson({hh:"你好",ee:222});


        // setTimeout( async () => {
        //     // NativeUtils.native.setFullScreen(true);
        //     NativeUtils.openFile();
        // }, 3000);
        


        // gameManager.init(this.node, this.cardPrefab);
    }
}


